package com.yida.system.api;

import org.springframework.cloud.openfeign.FeignAutoConfiguration;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;

import com.yida.common.core.constant.SecurityConstants;
import com.yida.common.core.constant.ServiceNameConstants;
import com.yida.common.core.domain.R;
import com.yida.system.api.domain.SysUserUkey;
import com.yida.system.api.factory.RemoteUKeyUserFallbackFactory;

/**
 * Ukey服务
 * 
 * @author hmh
 * @date 2022/10/26
 */
@FeignClient(contextId = "remoteUKeyUserService", value = ServiceNameConstants.SYSTEM_SERVICE, fallbackFactory = RemoteUKeyUserFallbackFactory.class, configuration = FeignAutoConfiguration.class)
public interface RemoteUKeyUserService {

    @PostMapping("/ukey/waitSignMsg")
    public R<SysUserUkey> waitSignMsg(@RequestBody SysUserUkey sSysUKeyUser, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);

    @PostMapping("/ukey/validate")
    public R<Boolean> ukeyValidate(@RequestBody SysUserUkey sSysUKeyUser, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);

}
